fix: resolve Storybook build errors and improve CI workflow#458
Merged
fix: resolve Storybook build errors and improve CI workflow#458
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Add viteCryptoStub() plugin to resolve @objectstack/core's crypto.createHash import that fails during browser builds - Add process.env/platform/version defines for browser compatibility - Add optimizeDeps.include for @objectstack/* runtime packages to reduce 504 Outdated Optimize Dep errors during dev mode - Set build.target to esnext for production builds Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix various errors in Storybook controls browser
fix: resolve Storybook build errors and improve CI workflow
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pnpm storybook:buildfails with"createHash" is not exported by "__vite-browser-external"because@objectstack/coreimports Node.jscryptoin browser builds. Dev mode suffers from repeated504 Outdated Optimize Deperrors causing blank preview iframes. CI workflow was missing package build steps and had no caching..storybook/main.tsviteCryptoStub()plugin — the stub already existed atscripts/vite-crypto-stub.tsand was used byapps/console, but was missing from the Storybook Vite configprocess.env/process.platform/process.versiondefines for browser compat (mirrors console config)@objectstack/*runtime packages viaoptimizeDeps.includeto eliminate dep discovery reloads on first page loadbuild.target: 'esnext'.github/workflows/storybook-tests.ymlstorybook-build(build verification, ~5min) →storybook-test(Playwright test-runner)pnpm buildbefore Storybook — packages must be built first--frozen-lockfile,permissions: contents: read💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.